{% if star_rating(restaurant.id)["review_count"] %}
    <span class="score">
        <div class="score-wrap align-top">
            <span class="stars-active" style="width:{{ star_rating(restaurant.id)['stars_percent'] }}%">
                <i class="fa fa-star" aria-hidden="true"></i>
                <i class="fa fa-star" aria-hidden="true"></i>
                <i class="fa fa-star" aria-hidden="true"></i>
                <i class="fa fa-star" aria-hidden="true"></i>
                <i class="fa fa-star" aria-hidden="true"></i>
            </span>
        <span class="stars-inactive">
                <i class="fa fa-star-o" aria-hidden="true"></i>
                <i class="fa fa-star-o" aria-hidden="true"></i>
                <i class="fa fa-star-o" aria-hidden="true"></i>
                <i class="fa fa-star-o" aria-hidden="true"></i>
                <i class="fa fa-star-o" aria-hidden="true"></i>
        </span>        
        </div>
        <span class="align-top">
            {{ star_rating(restaurant.id)["avg_rating"]|float }} ({{star_rating(restaurant.id)["review_count"]}} {% if star_rating(restaurant.id)["review_count"] == 1 %} review{% else %} reviews{% endif %})
        </span>
    </span> 
{% else %}
  <span class="fst-italic">No ratings yet</span>
{% endif %}
